<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>设备、器材、办公用品</title>
</head>
<body>
<script type="text/javascript">
function onclickEquip(x){
	var where = $("#select_where").val();
	if(x=="a"){
		$("#select_eos").datagrid({			
			url:'getEquip_list',
			queryParams: {
				where: where,		
			} 
		});
	}else if(x=="b"){
		$("#select_eos").datagrid({			
			url:'getSupply_list',
			queryParams: {
				where: where,		
			} 
			});
	}else{
		$("#select_eos").datagrid({			
			url:'getOffice_list',
			queryParams: {
				where: where,		
			} 
			});
	}
	$("#select_where").textbox('setValue','');
}

</script>
	<div id="equip_office_supply">
	<div style="float:left">
		<input id="select_where" class="easyui-textbox" style="width: 300px;height:30px;padding:10px;"
			data-options="prompt:'输入名称关键字'"> </input>
		
	</div>
	<div style="margin-left:500px">
		<a onclick="onclickYes()" class="easyui-linkbutton" iconCls="icon-save">确认</a>
	</div>
	
	<div id="cc" class="easyui-layout" style="margin-top:5px;width:770px;height:320px;">        
   	<div data-options="region:'west',split:true" style="width:150px;">
	<div class="easyui-panel"  border="false" fit="true" 
 		style="width:150px;height:100%;padding:10px;background:#fafafa;">
		<ul id="tt" class="easyui-tree">
			<li><span>类型</span>
				<ul>
					<li><span><a href="#" onclick="onclickEquip('a')">设备</a></span></li>
					<li><span><a href="#" onclick="onclickEquip('b')">耗材</a></span></li>
					<li><span><a href="#" onclick="onclickEquip('c')">办公用品</a></span></li>
				</ul>
			</li>
		</ul>
	</div>
	</div>
	<div data-options="region:'center'" border="false" style="padding:5px;background:#eee;">
		<!-- <table id="select_eos" style="width: 97%;height:310px"></table>   -->
		
		 <table class="easyui-datagrid" style="width: 97%;height:310px" id="select_eos"
			data-options="url:'',fitColumns:true,singleSelect:true,pagination:true,rownumbers: true">
			<thead>
				<tr>
					<th style="width:5%" data-options="field:'check',checkbox:true"></th>
					<th style="width:10%" data-options="field:'id'">编码</th>
					<th style="width:30%" data-options="field:'name'">名称</th>
					<th style="width:15%" data-options="field:'price'">价格</th>
					<th style="width:15%" data-options="field:'company'">单位</th>
					<th style="width:25%" data-options="field:'type'">类型</th>					
				</tr>
			</thead>
		</table> 
		</div>
	</div>
</div>
</body>
</html>